package cn.iocoder.yudao.framework.pay.core.client.impl.pax.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 终端类型
 */
public enum TerminalTypeEnum {
    APP("APP"), // app
    MINI_PROGRAM("MINI_PROGRAM"), // 小程序
    WAP("WAP"), // 手机h5页面
    WEB("WEB"), // pc端浏览器
    ;

    private final String value;

    TerminalTypeEnum(String value) {
        this.value = value;
    }

    // Jackson deserialization method
    @JsonCreator
    public static TerminalTypeEnum fromValue(String value) {
        for (TerminalTypeEnum status : TerminalTypeEnum.values()) {
            if (status.value.equalsIgnoreCase(value)) {
                return status;
            }
        }
        throw new IllegalArgumentException("Invalid terminalType: " + value);
    }

    // Jackson serialization method
    @JsonValue
    public String getValue() {
        return value;
    }

}
